<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>登陆</title>
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>

<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <h3 class="text-center">登陆</h3>
            <span th:if="${account_error!=null}">
                <div class="alert alert-dismissable alert-danger">
                    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                    <span th:text="${account_error}"></span>
                </div>
            </span>
            <span th:each="verificationError:${verificationErrors}">
                <div class="alert alert-dismissable alert-danger">
                    <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                    <span th:text="${verificationError.defaultMessage}"></span><br/>
                </div>
            </span>
            <form class="form-horizontal" role="form" th:action="@{/login}" method="post">
                <div class="form-group">
                    <label for="inputEmail3" class="col-sm-2 control-label">学号</label>
                    <div class="col-sm-10">
                        <input type="text" placeholder="学号" onkeyup="this.value=this.value.replace(/\D/gi,'')" class="form-control" id="inputEmail3" name="account" th:value="(${form})?(${form.account})"/>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label">密码</label>
                    <div class="col-sm-10">
                        <input type="password" placeholder="密码" class="form-control" id="inputPassword3" name="password" th:value="(${form})?(${form.password})"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10 text-center">
                        <button type="submit" class="btn btn-default">登陆</button>
                    </div>
                </div>
            </form>
            <div class="text-center">
                <a th:href="@{/index}">游客身份进入</a>
            </div>
        </div>
    </div>
</div>




</body>
</html>